package com.ego.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ego.pojo.Category;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Ares
 * @date 2020-11-20
 */
public interface CategoryMapper extends BaseMapper<Category> {

    /**
     * 通过品牌ID查询到种类ID的集合
     * @param bid 品牌ID
     * @return 返回种类ID的集合
     */
    @Select("select category_id from tb_category_brand where brand_id=#{bid}")
    List<Long> selectCategoryBrandById(Long bid);

}
